package cn.yangliu.dubbo.web;

import cn.yangliu.dubbo.service.ProviderService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 作者 杨柳
 * 创建时间 2017-08-31 12:13
 */
@Controller
public class MyController {

    @Reference(interfaceClass=ProviderService.class,version = "1.0")
    private ProviderService service;
    @RequestMapping("/test")
    @ResponseBody
    public String test(String name){
        return service.hello(name);
    }
}
